/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package br.com.redesocial.view;

import br.com.redesocial.business.Business;
import br.com.redesocial.entity.Usuario;
import java.io.IOException;
import java.sql.SQLException;
import java.util.List;
import javax.servlet.http.HttpServletRequest;

/**
 *
 * @author Bruno
 */
public class View {
    public int CadastrarUsuario(Usuario usu) throws IOException{
        Business Bs = new Business();
        int retorno = Bs.CadastrarUsuario(usu);
        return retorno;
    }
    
    public void CompletaCadastroUsuario(Usuario usu) throws IOException{
        Business Bs = new Business();
        Bs.CompletaCadastroUsuario(usu);
    }

    public List AutenticarUsuario(Usuario usu) throws IOException {
        Business Bs = new Business();
        List retorno = Bs.AutenticarUsuario(usu);
        return retorno;
    }
    
    public String ListaFeeds(HttpServletRequest request) throws SQLException{
        Business Bs = new Business();
        String retorno = Bs.ListaFeeds(request);
        return retorno;
    }
    
    public String ListaAmigos(HttpServletRequest request) throws SQLException{
        Business Bs = new Business();
        String retorno = Bs.ListaAmigos(request);
        return retorno;
    }
    
    public void AceitarAmigos(String id_amigo, HttpServletRequest request) throws SQLException{
        Business Bs = new Business();
        Bs.AceitarAmigos(id_amigo, request);        
    }
    
    public String BuscaAmigo(String amigo, HttpServletRequest request) throws SQLException{
        Business Bs = new Business();
        String retorno = Bs.BuscaAmigo(amigo, request);
        return retorno;
    }
    
    public void SolicitarAmizade(String id_amigo, HttpServletRequest request) throws SQLException{
        Business Bs = new Business();
        Bs.SolicitarAmizade(id_amigo, request);        
    }
    
    public List Perfil(String perfil){
        Business Bs = new Business();
        List retorno = Bs.Perfil(perfil);
        return retorno;
    }

}
